import { createApp } from 'vue'
import './style.scss'
import App from './App.vue'

const app = createApp(App)

import router from './router'
app.use(router)
app.config.globalProperties.$routerAry = []

//global mixin
import elementMixin from './mixins/elementMixin.js'
app.mixin(elementMixin)
import routerMixin from './mixins/routerMixin.js'
app.mixin(routerMixin)

//ajax
import axiosReq from './utils/axiosReq.js'
app.config.globalProperties.$ajax = axiosReq
import utils from './utils/utils.js'
app.config.globalProperties.$util = utils
import settings from './utils/setting'
app.config.globalProperties.$setting = settings

import * as Pinia from 'pinia'
import { useUserStore } from '@/stores/index.js'
app.config.globalProperties.$useStore = useUserStore

app.use(Pinia.createPinia())

import * as echarts from 'echarts'
app.config.globalProperties.$echarts = echarts;

app.mount('#app')
